﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            hxxdHandler h = new hxxdHandler();
            h.NewItemAddEvent += GetData;

            h.SetNewItem();

            Console.Read();
        }
       static void GetData() {

            Console.WriteLine("获取到新闻");

        }
    }
    class hxxdHandler
    {
        public delegate void NewItemEventHandler();
        public event NewItemEventHandler NewItemAddEvent;
        public NewItemEventHandler NewItemAddDelegate;

        private List<zc_hxxd> hxxdList { get; set; }

        public void SetNewItem() {
            if(NewItemAddEvent != null)
            this.NewItemAddEvent();

        }

    }
    class zc_hxxd
    {


        #region 属性
        public string Id { get; set; }
        public aType type { get; set; }
        public string Content { get; set; }
        public string Url { get; set; }

        public DateTime PubTime { get; set; }

        public DateTime CreatetionTime { get; set; }
        #endregion

        #region 构造函数
        public zc_hxxd()
        {
            CreatetionTime = DateTime.Now;

        }
        #endregion


    }

    enum aType { 普通新闻, 重要新闻, 网址链接, 图片新闻 }
}
